package com.fallsvc.re.networkprogramming.producer_consumer;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @auther falls_vc
 * description:
 * @date 2025/10/29  9:31
 */
public class Demo1 {
    // 阻塞队列
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<Integer> blockingQueue = new LinkedBlockingQueue<>();
        BlockingQueue<Integer> blockingQueue1 = new ArrayBlockingQueue<>(10);
        blockingQueue.put(1);

        System.out.println(blockingQueue.take());
    }
}
